

/*import Excel database*/


***code demographics

encode Age, gen(ages1)
tab ages1
tab ages1, nolabel
recode ages1(53 54 55 56 57=.)
summ ages1
gen age=(ages1+17)
summ age

encode Gender, gen(gender)
tab gender
tab gender, nolabel
gen female=.
recode female(.=1) if gender==2
recode female(.=0) if gender==1
tab female

encode Education, gen(educ)
tab educ
tab educ, nolabel
recode educ(5 6=.)
tab educ

encode Partisanship, gen(partyID)
tab partyID, nolabel
recode partyID (6 7=.)
tab partyID


***********************************
**Table SM.3, Sample Demographics**
***********************************

summ age
tab female
tab educ
tab partyID


***create manipulation variable

encode Control_Turtle, gen(control)

encode SharedDisc, gen(SharedDisc1)

gen shareddisc=.
recode shareddisc(.=1)if SharedDisc1==1
recode shareddisc(.=0) if control==1

tab shareddisc

***code solidarity variables

encode Bond_Palestine, gen(bondP)
tab bondP, nolabel
recode bondP (6 7 =.)
summ bondP

encode Allies_Palestine, gen(alliesP)
tab alliesP, nolabel
recode alliesP (6 7 =.)
summ alliesP

encode CFate_Palestine, gen(fateP)
tab fateP, nolabel
recode fateP (6 7 =.)
summ fateP

pwcorr bondP alliesP fateP, sig
alpha bondP alliesP fateP, std

***create solidarity index

gen solidarity1=(bondP+alliesP+fateP)/3
summ solidarity1
gen solidarity=(solidarity1-1)/4
summ solidarity


***code policy items

encode Policy1, gen(policy1)
tab policy1, nolabel
recode policy1(6 7 =.)
recode policy1(1=5)(2=4)(3=3)(4=2)(5=1)
summ policy1

encode Policy2, gen(policy2)
tab policy2, nolabel
recode policy2(6 7 =.)
recode policy2(1=5)(2=4)(3=3)(4=2)(5=1)
summ policy2

encode Policy3, gen(policy3)
tab policy3, nolabel
recode policy3(6 7 =.)
summ policy3

encode Policy4, gen(policy4)
tab policy4, nolabel
recode policy4(6 7 =.)
recode policy4(1=5)(2=4)(3=3)(4=2)(5=1)

pwcorr policy1 policy2 policy3 policy4, sig
alpha policy1 policy2 policy3 policy4, std

gen propal1=(policy1+policy2+policy3+policy4)/4
gen propal=(propal1-1)/4
summ propal


***code feeling therms

encode FT_Palestinian_1, gen(FTpal)
tab FTpal
summ FTpal
recode FTpal (87 88=.)
summ FTpal

encode FT_Israeli_1, gen(FTisrael)
tab FTisrael
summ FTisrael
recode FTisrael (92 93=.)
summ FTisrael

summ FTpal FTisrael

gen Pal_Isr=(FTpal-FTisrael)
summ Pal_Isr
gen FTpalest=(Pal_Isr+85)/170
summ FTpalest


*********************************************************************************
**Table 1, Shared Discrimination's Indirect Effect on Pro-Palestinian Attitudes**
*********************************************************************************

*direct effects

reg propal shareddisc
reg FTpalest shareddisc

*indirecte effect through solidarity

reg solidarity shareddisc
reg propal solidarity
reg FTpalest solidarity


***************************************************************************************
**Table 2, factor analysis of PoC solidarity items with(out) mentions of Palestinians**
***************************************************************************************

**code solidarity items at end of survey
 
encode Bond_PoC, gen(bondPoC)
tab bondPoC, nolabel
recode bondPoC (6 7 =.)
summ bondPoC

encode Allies_PoC, gen(alliesPoC)
tab alliesPoC, nolabel
recode alliesPoC (6 7 =.)
summ alliesPoC

encode CFate_PoC, gen(fatePoC)
tab fatePoC, nolabel
recode fatePoC (6 7 =.)
summ fatePoC

alpha bondPoC alliesPoC fatePoC, std

**factor analyze all items, restrict sample to control group

factor bondP bondPoC alliesP alliesPoC fateP fatePoC if shareddisc==0

**create additional scale of solidarity and correlate with original scale

gen solidarityB=(bondPoC+alliesPoC+fatePoC)/3
summ solidarityB
gen solidarity2=(solidarityB-1)/4
summ solidarity2

pwcorr solidarity solidarity2 if shareddisc==0, sig


*******************************************************************
**Section SM.4. alternate explanations for null treatment effects**
*******************************************************************

**inattentiveness

*generate manipulation check variable

encode QC_TC, gen(turtle)
encode QC_SD, gen(treats)

gen failedcheck=0
recode failedcheck (0=1) if turtle==2
recode failedcheck (0=1) if treats==2
tab failedcheck

*ceiling effects

summ solidarity

**treatment heterogeneity

*college education as treatment moderator

encode Education, gen(educ)
tab educ

gen college=0
recode college(0=1) if educ==4

gen college2=0
recode college2(0=1) if educ==3
recode college2(0=1) if educ==4

gen disceduc=(shareddisc*college)
gen disceduc2=(shareddisc*college)

reg solidarity shareddisc college
reg solidarity shareddisc college disceduc, robust

reg solidarity shareddisc college2
reg solidarity shareddisc college2 disceduc2, robust

*age as treatment moderator

encode Age, gen(ages)
summ ages
gen edad=(ages+17)
summ edad

gen discold=(shareddisc*edad)

reg solidarity shareddisc edad

reg solidarity shareddisc edad discold, robust
